<include file="public@header"/>

</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">

			<li><a href="{:url('Order/index')}">运营中心</a></li>
			<li><a href="{:url('Order/addOrder')}">添加</a></li>
			<li class="active"><a href="{:url('Order/lostOrder')}">退租</a></li>
			<!-- 	<li class="active><a href="{:url('station/index')}">园区添加</a></li> -->
			<!-- <li ><a href="javascript:;">编辑分类</a></li> -->
		</ul>

		<form method="post" class="form-horizontal  margin-top-20" action="lostOrder">
		  <!--   <input type="hidden" name="space_name" value="">
		    <input type="hidden" name="customer_name" value=""> -->
		    <input type="hidden" name="id" value="{$id}">
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label">退租原因<span class="form-required">*</span></label>
				<div class="col-md-6 col-sm-10">
					<select class="form-control  space_type" name="lost_rent" id="parent_id"  required="true">
						<option value="">==请选择==</option>
						<option value="1">孵化企业</option>
						<option value="2">价格原因</option>
						<option value="3">服务配套原因</option>
						<option value="4">缺失资源</option>
						<option value="5">其他原因</option>
					</select>
				</div>
			</div>

		

		</div>
			
<!-- 				<label for="input-remark" class="col-sm-2 control-label">备注</label> -->
			<!-- 	<div class="col-md-6 col-sm-10">
					<label class="radio-inline js-icheck"><input type="radio" name="status" value="1" checked>显示</label>
					<label class="radio-inline js-icheck"><input type="radio" name="status" value="0" <if condition="1">checked</if>>隐藏</label>
				</div> -->
			<!-- </div>  -->
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<!-- <input type="hidden" name="id" value="1"> -->
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
					<a class="btn btn-default" href="{:url('index',['type_id'=>1])}">{:lang('BACK')}</a>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
	
	$(".space_types").change(function(){
		var b=$(".space_name option:first").text();  
		$(".space_name").html("<option value=''>"+b+"</option>");  
        var type=$(".space_type").val();
        var option;
        $.post("{:url('Order/get_space')}",{type:type},function(data,status){
        		$.each(data,function(i,j){

        			if(type==1){
        				option+='<option value='+j.id+'>'+j.station_name+'</option>';	
        			}else{
        				option+='<option value='+j.id+'>'+j.site_name+'</option>';
        			}
        		
        		})
        		$(".space_name").append(option);
        })
       // alert(option);
	})
	$(".space_name").change(function(){
		name=$(this).find("option:selected").text();
		$("input[name=space_name]").val(name);
	})
	$("select[name=customer_id]").change(function(){
		name=$(this).find("option:selected").text();
		$("input[name=customer_name]").val(name);
	})

	</script>
</body>
</html>